package com.lagou.edu.course.api;

import com.lagou.edu.course.api.dto.CoursePlayHistoryDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * TODO
 *
 * @author lm
 * @since 2021/11/2 10:20
 */
@FeignClient(value = "edu-course-boot", path = "/course/coursePlayHistory")
public interface CoursePlayHistoryRemoteService {
    /**
     * 获取课程播放节点
     *
     * @param lessonId 课时ID
     * @return
     */
    @GetMapping(value = "/getByLessonId", consumes = "application/json")
    CoursePlayHistoryDTO getByLessonId(@RequestParam("lessonId") Integer lessonId, @RequestParam("userId") Integer userId);

    @PostMapping(value = "/saveCourseHistoryNode",consumes = "application/json")
    void saveCourseHistoryNode(@RequestBody CoursePlayHistoryDTO playHistoryDTO);
}
